<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>用户权限</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      <el-table :data="rootList" border stripe>
        <el-table-column label="#" type="index"></el-table-column>
        <el-table-column label="权限名称" prop="rootName"></el-table-column>
        <el-table-column label="路径" prop="path"></el-table-column>
        <el-table-column label="权限等级" prop="grade">
            <template slot-scope="scope">
                <el-tag v-if="scope.row.grade === '1'">一级</el-tag>
                <el-tag type="success" v-else-if="scope.row.grade === '2'">二级</el-tag>
                <el-tag type="warning" v-else>三级</el-tag>
            </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
    data() {
        return{
            rootList:[
                {rootName:"商品管理",path:"goods",grade:"1"},
                {rootName:"订单管理",path:"orders",grade:"2"},
                {rootName:"商品列表",path:"goods",grade:"3"},
                {rootName:"用户列表",path:"users",grade:"1"},
            ]
        }
    }
};
</script>

<style>
</style>